package weibo4andriod;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.security.AccessControlException;
import java.util.Properties;

public class a
{
  private static Properties a;
  private static boolean b;

  static
  {
    Properties localProperties = new Properties();
    a = localProperties;
    localProperties.setProperty("weibo4j.debug", "true");
    a.setProperty("weibo4j.source", e.a);
    a.setProperty("weibo4j.clientURL", "http://open.t.sina.com.cn/-{weibo4j.clientVersion}.xml");
    a.setProperty("weibo4j.http.userAgent", "weibo4j http://open.t.sina.com.cn/ /{weibo4j.clientVersion}");
    a.setProperty("weibo4j.http.useSSL", "false");
    a.setProperty("weibo4j.http.proxyHost.fallback", "http.proxyHost");
    a.setProperty("weibo4j.http.proxyPort.fallback", "http.proxyPort");
    a.setProperty("weibo4j.http.connectionTimeout", "20000");
    a.setProperty("weibo4j.http.readTimeout", "120000");
    a.setProperty("weibo4j.http.retryCount", "3");
    a.setProperty("weibo4j.http.retryIntervalSecs", "10");
    a.setProperty("weibo4j.async.numThreads", "1");
    a.setProperty("weibo4j.clientVersion", "2.0.10");
    try
    {
      Class.forName("dalvik.system.VMRuntime");
      a.setProperty("weibo4j.dalvik", "true");
      b = e("weibo4j.dalvik");
      if ((!(a(a, "." + File.separatorChar + "weibo4j.properties"))) && (!(a(a, a.class.getResourceAsStream("/WEB-INF/" + "weibo4j.properties")))))
        a(a, a.class.getResourceAsStream("/" + "weibo4j.properties"));
      return;
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      a.setProperty("weibo4j.dalvik", "false");
    }
  }

  public static String a(String paramString)
  {
    return a("weibo4j.clientVersion", paramString);
  }

  private static String a(String paramString1, String paramString2)
  {
    Object localObject;
    try
    {
      localObject = System.getProperty(paramString1, paramString2);
      if (localObject == null)
        localObject = a.getProperty(paramString1);
      if (localObject == null)
      {
        String str1 = a.getProperty(paramString1 + ".fallback");
        if (str1 != null)
        {
          String str2 = System.getProperty(str1);
          localObject = str2;
        }
      }
      return g((String)localObject);
    }
    catch (AccessControlException localAccessControlException)
    {
      localObject = paramString2;
    }
  }

  public static boolean a()
  {
    return b;
  }

  private static boolean a(Properties paramProperties, InputStream paramInputStream)
  {
    int i;
    try
    {
      paramProperties.load(paramInputStream);
      i = 1;
      return i;
    }
    catch (Exception localException)
    {
      i = 0;
    }
  }

  private static boolean a(Properties paramProperties, String paramString)
  {
    int i;
    try
    {
      File localFile = new File(paramString);
      if ((!(localFile.exists())) || (!(localFile.isFile())))
        break label42;
      paramProperties.load(new FileInputStream(localFile));
      i = 1;
      label42: return i;
    }
    catch (Exception localException)
    {
      i = 0;
    }
  }

  public static String b(String paramString)
  {
    return a("weibo4j.clientURL", paramString);
  }

  public static boolean b()
  {
    return e("weibo4j.http.useSSL");
  }

  public static String c()
  {
    if (e("weibo4j.http.useSSL"));
    for (String str = "https://"; ; str = "http://")
      return str;
  }

  public static String c(String paramString)
  {
    return a("weibo4j.user", paramString);
  }

  public static String d()
  {
    return a("weibo4j.source", null);
  }

  public static String d(String paramString)
  {
    return a("weibo4j.password", paramString);
  }

  public static String e()
  {
    return a("weibo4j.http.proxyHost", null);
  }

  private static boolean e(String paramString)
  {
    return Boolean.valueOf(a(paramString, null)).booleanValue();
  }

  private static int f(String paramString)
  {
    String str = a(paramString, null);
    int i;
    try
    {
      int j = Integer.parseInt(str);
      i = j;
      return i;
    }
    catch (NumberFormatException localNumberFormatException)
    {
      i = -1;
    }
  }

  public static String f()
  {
    return a("weibo4j.http.proxyUser", null);
  }

  public static String g()
  {
    return a("weibo4j.http.proxyPassword", null);
  }

  private static String g(String paramString)
  {
    Object localObject1 = paramString;
    if (localObject1 == null)
      label2: return localObject1;
    int i = ((String)localObject1).indexOf("{", 0);
    int j;
    String str;
    if (-1 != i)
    {
      j = ((String)localObject1).indexOf("}", i);
      if (j > i + 1)
      {
        str = ((String)localObject1).substring(i + 1, j);
        if (str.length() <= 0);
      }
    }
    for (Object localObject2 = ((String)localObject1).substring(0, i) + a(str, null) + ((String)localObject1).substring(j + 1); ; localObject2 = localObject1)
    {
      if (!(((String)localObject2).equals(localObject1)));
      localObject1 = localObject2;
      break label2:
    }
  }

  public static int h()
  {
    return f("weibo4j.http.proxyPort");
  }

  public static int i()
  {
    return f("weibo4j.http.connectionTimeout");
  }

  public static int j()
  {
    return f("weibo4j.http.readTimeout");
  }

  public static int k()
  {
    return f("weibo4j.http.retryCount");
  }

  public static int l()
  {
    return f("weibo4j.http.retryIntervalSecs");
  }

  public static String m()
  {
    return a("weibo4j.user", null);
  }

  public static String n()
  {
    return a("weibo4j.password", null);
  }

  public static String o()
  {
    return a("weibo4j.http.userAgent", null);
  }

  public static String p()
  {
    return a("weibo4j.oauth.consumerKey", null);
  }

  public static String q()
  {
    return a("weibo4j.oauth.consumerSecret", null);
  }

  public static boolean r()
  {
    return e("weibo4j.debug");
  }
}

/* Location:           E:\Desktop\Android\wordstd\classes_dex2jar.jar
 * Qualified Name:     weibo4andriod.a
 * JD-Core Version:    0.5.3
 */